home *** CD-ROM | disk | FTP | other *** search
/ Hyper Stacks 1994 May / Hyper Stacks (Pacific HiTech)(1994)[Mac].iso / Utilities / Apple Event Test elwin / card_2916.txt < prev    next >
Encoding:
Text File  |  1994-04-30  |  3.0 KB  |  137 lines

  1. -- card: 2916 from stack: in
  2. -- bmap block id: 3658
  3. -- flags: 0000
  4. -- background id: 2779
  5. -- name: 
  6. ----- HyperTalk script -----
  7. on appleEvent class,id,sender
  8.   put empty into cd fld temp
  9.   put empty into cd fld data
  10.   put empty into cd fld "result_fld"
  11.   put "I got an Apple Event From:" & return into cd fld temp
  12.   put sender & return after cd fld temp
  13.   put "class: " & class & return after cd fld temp
  14.   put "id: " & id & return after cd fld temp
  15.   request appleEvent data
  16.   put it into cd fld "data"
  17.  
  18. end appleEvent
  19.  
  20.  
  21.  
  22.  
  23. -- part 1 (field)
  24. -- low flags: 04
  25. -- high flags: 0002
  26. -- rect: left=11 top=4 right=54 bottom=211
  27. -- title width / last selected line: 0
  28. -- icon id / first selected line: 0 / 0
  29. -- text alignment: 0
  30. -- font id: 3
  31. -- text size: 9
  32. -- style flags: 0
  33. -- line height: 12
  34. -- part name: temp
  35.  
  36.  
  37. -- part 2 (button)
  38. -- low flags: 00
  39. -- high flags: A003
  40. -- rect: left=0 top=218 right=240 bottom=100
  41. -- title width / last selected line: 0
  42. -- icon id / first selected line: 0 / 0
  43. -- text alignment: 1
  44. -- font id: 0
  45. -- text size: 12
  46. -- style flags: 0
  47. -- line height: 16
  48. -- part name: get address
  49. ----- HyperTalk script -----
  50. on mouseUp
  51.   global address
  52.   put empty into cd fld temp
  53.   put empty into cd fld data
  54.   put empty into cd fld "result_fld"
  55.  
  56.   answer program "enter the address for the program"
  57.   put it into address
  58.   put it into cd field "address"
  59.  
  60. end mouseUp
  61.  
  62.  
  63. -- part 3 (button)
  64. -- low flags: 00
  65. -- high flags: A003
  66. -- rect: left=124 top=218 right=240 bottom=224
  67. -- title width / last selected line: 0
  68. -- icon id / first selected line: 0 / 0
  69. -- text alignment: 1
  70. -- font id: 0
  71. -- text size: 12
  72. -- style flags: 0
  73. -- line height: 16
  74. -- part name: Send event
  75. ----- HyperTalk script -----
  76. on mouseUp
  77.   global address
  78.   put line 1 of cd fld "address" into address
  79.   put empty into cd fld temp
  80.   put empty into cd fld "result_fld"
  81.  
  82.   put cd fld data into my_data
  83.   send my_data to program address
  84.   put the result into cd fld "result_fld"
  85.   if cd fld "result_fld" is empty
  86.   then
  87.   put "I Sent an Apple Event: no error " into cd field "result_fld"
  88. end if
  89.  
  90. end mouseUp
  91.  
  92.  
  93. -- part 5 (field)
  94. -- low flags: 04
  95. -- high flags: 0002
  96. -- rect: left=11 top=106 right=131 bottom=211
  97. -- title width / last selected line: 0
  98. -- icon id / first selected line: 0 / 0
  99. -- text alignment: 0
  100. -- font id: 3
  101. -- text size: 9
  102. -- style flags: 0
  103. -- line height: 12
  104. -- part name: address
  105.  
  106.  
  107. -- part 6 (field)
  108. -- low flags: 04
  109. -- high flags: 0007
  110. -- rect: left=11 top=145 right=194 bottom=211
  111. -- title width / last selected line: 0
  112. -- icon id / first selected line: 0 / 0
  113. -- text alignment: 0
  114. -- font id: 3
  115. -- text size: 9
  116. -- style flags: 0
  117. -- line height: 12
  118. -- part name: data
  119.  
  120.  
  121. -- part 7 (field)
  122. -- low flags: 04
  123. -- high flags: 0002
  124. -- rect: left=11 top=68 right=93 bottom=211
  125. -- title width / last selected line: 0
  126. -- icon id / first selected line: 0 / 0
  127. -- text alignment: 0
  128. -- font id: 3
  129. -- text size: 9
  130. -- style flags: 0
  131. -- line height: 12
  132. -- part name: result_fld
  133.  
  134.  
  135. -- part contents for card part 7
  136. ----- text -----
  137. No such program.